package rollingCounter

type Iterator struct {
	count int
	iterated int
	cur *Bucket
}

func (i *Iterator)Ending() bool {
	return i.iterated == i.count
}

func (i *Iterator)Get() *Bucket {
	b := i.cur
	i.iterated++
	i.cur = i.cur.Next()
	return b
}